import { createWebHashHistory, createRouter } from 'vue-router'

import main from '../views/main.vue'
import productPage from '../views/productPage.vue'
import orderPage from '../views/orderPage.vue'
import customerPage from '../views/customerPage.vue'
import userPage from '../views/userPage.vue'
import rolePage from '../views/rolePage.vue'
import permissionPage from '../views/permissionPage.vue'
import assignPermissionPage from '../views/assignPermissionPage.vue'
import myCustomerPage from '../views/myCustomerPage.vue'
import menuPage from '../views/menuPage.vue'


const routes = [
    { path: '/main', component: main ,children:[
            {path:'/productPage',component: productPage},
            {path:'/orderPage',component: orderPage},
            {path:'/customerPage',component: customerPage},
            {path:'/userPage',component: userPage},
            {path:'/rolePage',component: rolePage},
            {path:'/permissionPage',component: permissionPage},
            {path:'/assignPermissionPage',name:'/assignPermissionPage',component: assignPermissionPage},
            {path:'/myCustomerPage',component: myCustomerPage},
            {path:'/menuPage',component: menuPage},
     ]},


]

const router = createRouter({
    history: createWebHashHistory(),
    routes,
})

export default router;